package com.jh.user.pojo.enums;

import org.apache.commons.lang.StringUtils;

public enum CityEnums {
    BJ("110000","北京"),
    SH("310000","上海"),
    TJ("120000","天津"),
    CQ("500000","重庆"),
    TW("810000","台湾"),
    XG("710000","香港"),
    AM("820000","澳门");

    CityEnums(String value,String desc) {
        this.value =value;
        this.desc = desc;
    }


    private String value;

    private String desc;


    public String getDesc() {
        return desc;
    }

    public String getValue() {
        return value;
    }

    public static String getCityValue(String  value) {
        if (StringUtils.isBlank(value)) return "";
        CityEnums[] enums = CityEnums.values();
        for (CityEnums cityEnums : enums) {
            if (value.equals(cityEnums.value) ) {
                return cityEnums.desc;
            }
        }
        return "";
    }
}